package com.zhuss.controller.${moudle};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.${moudle}.${tablePkg}.Detail${poEntity}Bo;
import com.zhuss.bean.bo.${moudle}.${tablePkg}.Search${poEntity}Bo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.${moudle}.${tablePkg}.${poEntity}ReadServiceExt;
import com.zhuss.exception.AabException;


/**
 * @description: ${tableComment}查询Controller
 * @author: zhushanshuo
 * @create: ${creatTime}
 **/
@RestController
@RequestMapping("/${poEntityLower}")
public class ${poEntity}ReadController extends BaseController {
	
	@Autowired
	@Qualifier("${poEntityLower}ReadService")
	private ReadService<Object, Object> ${poEntityLower}ReadService;
	
	@Autowired
	@Qualifier("${poEntityLower}ReadServiceExt")
	private ${poEntity}ReadServiceExt ${poEntityLower}ReadServiceExt;
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws AabException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody Detail${poEntity}Bo bo) throws AabException {
		
		Object result = ${poEntityLower}ReadService.detail(bo);
		return result;
    }
	
	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws AabException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody Search${poEntity}Bo bo) throws AabException {
		
		Object result = ${poEntityLower}ReadService.list(bo);
		return result;
    }
	
}
